package cn.gailvlun.gll.net.apartment.room;

import cn.gailvlun.gll.bean.PlaceHolder;
import cn.gailvlun.gll.net.ListRes;
import cn.gailvlun.gll.net.Member;
import cn.gailvlun.gll.net.Optional;

import cn.gailvlun.gll.net.token.Authorization;
import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Query;



public interface RoomService {

    
    @Authorization
    @GET("room/list/")
    Observable<ListRes<Room>> getRoomList(@Query("direction") String direction,
                                    @Query("id") Integer id,
                                    @Query("type") RoomType roomType,
                                    @Optional @Query("room_tag") String roomTag);

    
    @Authorization
    @GET("room/")
    Observable<GetRoomDetailRes> getRoomDetail(@Query("room_id") int roomId);

    
    @Authorization
    @POST("room/")
    Observable<Room> createRoom(@Body CreateRoomReq createRoomReq);

    
    @Authorization
    @PUT("room/")
    Observable<Room> modifyRoom(@Body ModifyRoomReq modifyRoomReq);

    @Authorization
    @POST("room/register/start/")
    Observable<PlaceHolder> startRoom(@Body StartRoomReq startRoomReq);

    @Authorization
    @POST("room/approve/")
    Observable<Room> goLiveRoom(@Body GoLiveRoomReq goLiveRoomReq);

    @Authorization
    @PUT("room/sub/")
    Observable<Room> subscribeRoom(@Body SubscribeRoomReq subscribeRoomReq);
}
